point_X = int(input())
A = int(input())
B = int(input())
if point_X < A and point_X < B:
    print('left')
elif point_X > A and point_X > B:
    print('right')
else:
    print('middle')